package com.csjbot.blackgaga.router;

import android.app.Application;

import com.alibaba.android.arouter.launcher.ARouter;

/**
 * Created by xiasuhuei321 on 2017/11/28.
 * author:luo
 * e-mail:xiasuhuei321@163.com
 */

public class BRouter {
    /**
     * 初始化 路由
     */
    public static void init(Application app, boolean isDebug) {
        if (isDebug) {
            ARouter.openLog();
            ARouter.openDebug();
        }

        ARouter.init(app);
    }

    private static class BRouterHolder {
        private static final BRouter INSTANCE = new BRouter();
    }

    private BRouter() {
    }

    public static BRouter getInstance() {
        return BRouterHolder.INSTANCE;
    }

    // 应用内跳转
    public BRouterDataCarry build(String url){
        return new BRouterDataCarry(url);
    }
}
